import Head from 'next/head';
import Examples from '../../../example-groups/ExpandingExamples';

<Head>
  <title>{'Expanding Tree Example - Material React Table V3 Docs'}</title>
  <meta
    name="description"
    content="A Material React Table example demonstrating expandable sub-rows in a tree structure"
  />
  <meta
    property="og:title"
    content="Aggregation and Grouping Material React Table Example"
  />
  <meta
    property="og:description"
    content="A Material React Table example demonstrating expandable sub-rows in a tree structure"
  />
</Head>

## Expanding Tree Example

Material React Table supports showing rows in a expanding tree structure. This example is the **_simplest_** implementation of this feature where each row of data potentially has a special `subRows` property that contains an array of sub rows. You don't have to follow this exact structure, but this is how MRT will expect to find your sub rows by default.

Learn more about how to customize this in the [expanding sub-rows feature guide](/docs/guides/expanding-sub-rows).

<Examples isPage />

View Extra Storybook **[Examples](https://www.material-react-table.dev/?path=/story/features-aggregation-examples)**
